package tgc.edu.exam.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import tgc.edu.exam.custom.CommonService;
import tgc.edu.exam.entity.BookRecord;
import tgc.edu.exam.repository.BookRecordRepository;

@Service
public class BookRecordService extends CommonService<BookRecord, Integer>{

	@Autowired
	private BookRecordRepository dao;
	
	public List<BookRecord> findByUsername(String username) {
		return dao.findByUsername(username);
	}

	public List<BookRecord> findByUsernameOrderByIdDesc(String username) {
		// TODO Auto-generated method stub
		return dao.findByUsernameOrderByIdDesc(username);
	}

	public BookRecord findByByid(String byid) {
		return dao.findByByid(byid);
	}

	public List<BookRecord> findByReturnDataLessThanAndState(String date, String string) {
		// TODO Auto-generated method stub
		return dao.findByReturnDataLessThanAndState(date,string);
	}

}
